<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class InitUpdate99 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('package_skus', function (Blueprint $table) {
            
            $table->integer('free_order_total')->default(0)->index()->comment('总免单数量');
            
            $table->dropColumn(['is_free_order']);
            
        });

        Schema::table('fudai_records', function (Blueprint $table) {
            
            $table->integer('free_order_total')->default(0)->index()->comment('总免单数量');
            
            $table->dropColumn(['is_free_order']);
            
        });

        Schema::table('yfs_records', function (Blueprint $table) {
            
            $table->integer('free_order_total')->default(0)->index()->comment('总免单数量');
            
            $table->dropColumn(['is_free_order']);
            
        });

        Schema::table('yfs_rooms', function (Blueprint $table) {
            
            $table->json('user_records')->nullable()->comment('用户抽取记录');
            
            // $table->dropColumn(['is_free_order']);
            
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
